import request from '@/utils/request'


// 查询列表
export function listConfig(params) {
  return request({
    url: '/console/config/list',
    method: 'get',
    params: params
  })
}

//新增问题
export function addConfig(data) {
  return request({
    url: '/console/config/add',
    method: 'post',
    data: data
  })
}

//修改问题
export function editConfig(data) {
  return request({
    url: '/console/config/update',
    method: 'post',
    data: data
  })
}

//查询id单条数据
export function getConfigById(params) {
  return request({
    url: '/console/config/getById',
    method: 'get',
    params: params
  })
}

//查询key单条数据
export function getConfigByKey(params) {
  return request({
    url: '/console/config/getByKey',
    method: 'get',
    params: params
  })
}

//删除数据
export function deleteConfig(data) {
  return request({
    url: '/console/config/delete',
    method: 'post',
    data: data
  })
}